#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

void Funnum(int arr[], int sz, int* num1, int* num2)
{
	int n = 0;
	int i = 0;
	int count = 0;
	for (i = 0; i < sz; i++)
	{
		n ^= arr[i];
	}
	for (i = 0; i < 32; i++)
	{
		if (n & (1 << i))
		{
			count = i;
			break;
		}
	}
	for (i = 0; i < sz; i++)
	{
		if (arr[i] & (1 << count))
		{
			*num1 ^= arr[i];
		}
		else
		{
			*num2 ^= arr[i];
		}
	}
}

int main()
{
	int num1 = 0;
	int num2 = 0;
	int arr[] = { 1,2,3,4,5,6,1,2,3,4 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	Funnum(arr, sz, &num1, &num2);
	printf("%d %d", num1, num2);
	return 0;
}